package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwMenu implements Serializable {

    /**
     * identifier field
     */
    private String menuCode;

    /**
     * persistent field
     */
    private String menuName;

    /**
     * nullable persistent field
     */
    private Short menuOrder;

    /**
     * nullable persistent field
     */
    private String menuUrl;

    /**
     * nullable persistent field
     */
    private String menuType;

    /**
     * nullable persistent field
     */
    private String menuParent;

    /**
     * nullable persistent field
     */
    private String menuImage;

    /**
     * nullable persistent field
     */
    private Short menuLevel;

    /**
     * nullable persistent field
     */
    private String menuShortcut;

    /**
     * full constructor
     */
    public PwMenu(java.lang.String menuCode, java.lang.String menuName, java.lang.Short menuOrder, java.lang.String menuUrl, java.lang.String menuType, java.lang.String menuParent, java.lang.String menuImage, java.lang.Short menuLevel, java.lang.String menuShortcut) {
        this.menuCode = menuCode;
        this.menuName = menuName;
        this.menuOrder = menuOrder;
        this.menuUrl = menuUrl;
        this.menuType = menuType;
        this.menuParent = menuParent;
        this.menuImage = menuImage;
        this.menuLevel = menuLevel;
        this.menuShortcut = menuShortcut;
    }

    /**
     * default constructor
     */
    public PwMenu() {
    }

    /**
     * minimal constructor
     */
    public PwMenu(java.lang.String menuCode, java.lang.String menuName) {
        this.menuCode = menuCode;
        this.menuName = menuName;
    }

    public java.lang.String getMenuCode() {
        return this.menuCode;
    }

    public void setMenuCode(java.lang.String menuCode) {
        this.menuCode = menuCode;
    }

    public java.lang.String getMenuName() {
        return this.menuName;
    }

    public void setMenuName(java.lang.String menuName) {
        this.menuName = menuName;
    }

    public java.lang.Short getMenuOrder() {
        return this.menuOrder;
    }

    public void setMenuOrder(java.lang.Short menuOrder) {
        this.menuOrder = menuOrder;
    }

    public java.lang.String getMenuUrl() {
        return this.menuUrl;
    }

    public void setMenuUrl(java.lang.String menuUrl) {
        this.menuUrl = menuUrl;
    }

    public java.lang.String getMenuType() {
        return this.menuType;
    }

    public void setMenuType(java.lang.String menuType) {
        this.menuType = menuType;
    }

    public java.lang.String getMenuParent() {
        return this.menuParent;
    }

    public void setMenuParent(java.lang.String menuParent) {
        this.menuParent = menuParent;
    }

    public java.lang.String getMenuImage() {
        return this.menuImage;
    }

    public void setMenuImage(java.lang.String menuImage) {
        this.menuImage = menuImage;
    }

    public java.lang.Short getMenuLevel() {
        return this.menuLevel;
    }

    public void setMenuLevel(java.lang.Short menuLevel) {
        this.menuLevel = menuLevel;
    }

    public java.lang.String getMenuShortcut() {
        return this.menuShortcut;
    }

    public void setMenuShortcut(java.lang.String menuShortcut) {
        this.menuShortcut = menuShortcut;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("menuCode", getMenuCode())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwMenu)) return false;
        PwMenu castOther = (PwMenu) other;
        return new EqualsBuilder()
                .append(this.getMenuCode(), castOther.getMenuCode())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getMenuCode())
                .toHashCode();
    }

}
